package com.ailk.util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import com.ailk.exception.DaoException;

public class ConnectionManager {

    private static String driver = "org.sqlite.JDBC";
    private static String url    = "jdbc:sqlite:test.db";

    public static Connection getConnection() throws DaoException {
        Connection conn = null;
        try {
            Class.forName(driver);
            conn = DriverManager.getConnection(url);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return conn;
    }
}
